/**
 * Created by zhaoxk on 2017/3/7.
 */
import { map } from 'lodash';

export default function objToArr({ target, transform, result }) {
    return map(transform, (t) => {
        const { key, name } = t;
        const [label, value] = result;
        return {
            [label]: name,
            [value]: target[key],
        };
    });
}
